package com.magpiebridge.service.Impl;

import com.magpiebridge.dao.MatchingDao;
import com.magpiebridge.pojo.Matching;
import com.magpiebridge.service.MatchingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MatchingServiceImpl implements MatchingService {

    @Autowired
    private MatchingDao matchingDao;
    @Override
    public int insertMatching(Matching matching) {
        return matchingDao.insert(matching);
    }

    @Override
    public int deleteMatching(Integer id) {
        return matchingDao.deleteById(id);
    }

    @Override
    public int updateMatching(Matching matching) {
        return matchingDao.updateById(matching);
    }

    @Override
    public List<Matching> getAllMatching() {
        return matchingDao.selectList(null);
    }

    @Override
    public Matching getMatchingById(Integer id) {
        return matchingDao.selectById(id);
    }
}
